package com.cmwa.scbp.sys.msg.adapter.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.commons.lang3.StringUtils;

import com.cmwa.scbp.sys.msg.adapter.EmailMessageService;
import com.cmwa.scbp.sys.msg.service.IMessageOperationService;
import com.cmwa.scbp.sys.msg.vo.ManualOperationParamsVo;

/**
 * 抽象类，实现发送特殊通知人
 * @author ex-hejm
 * @date 2018年10月22日 下午3:13:48
 */
public abstract class AbstractEmailMessageServerce implements EmailMessageService {

	@Resource
	public IMessageOperationService messageOperationService;

	/**
	 * 获取特殊人员 任务的创建者和分配人
	 */
	@Override
	public List<Map<String, String>> obtainSpecialPerson(ManualOperationParamsVo params) {
		List<String> taskIds = new ArrayList<String>();
		String taskId = params.getTaskId();
		if(StringUtils.isNotBlank(taskId)) {
			String[] split = taskId.split(",");
			for (String string : split) {
				taskIds.add(string);
			}
		}
		List<Map<String, String>> list = messageOperationService.obtainSpecialPerson(taskIds);
		return list;
	}
}
